package com.scalar.forecast.forecastEntry;

import com.scalar.chiptrack.utils.StringUtils;

/**
 * User: Sujan Kumar
 * Date: Feb 14, 2005
 * Time: 12:22:29 PM
 */
public class SlotData
{
    private int rowId;
    private int qty;
    private double price;
    private float confidenceLevel;
    private String userList1;
    private String userDate1;
    private String userTxt1;
    private String userTxt2;

    public SlotData()
    {
        rowId = -1;
        qty = 0;
        price = 0.0d;
        confidenceLevel = 100f;
        userList1 = null;
        userDate1 = null;
        userTxt1 = null;
        userTxt2 = null;
    }

	public SlotData ( SlotData slotData ) //copy constructor
	{
		if ( slotData != null )
		{
			this.rowId 	= slotData.getRowId ();
			this.qty	= slotData.getQty ();
			this.price	= slotData.getPrice ();
			this.confidenceLevel	= slotData.getConfidenceLevel ();
			this.userList1	= slotData.getUserList1 ();
			this.userDate1	= slotData.getUserDate1 ();
			this.userTxt1	= slotData.getUserTxt1 ();
			this.userTxt2	= slotData.getUserTxt2 ();
		}
	}

    public int getRowId()
    {
        return rowId;
    }

    public void setRowId(int rowId)
    {
        this.rowId = rowId;
    }

    public float getConfidenceLevel()
    {
        return confidenceLevel;
    }

    public void setConfidenceLevel(float confidenceLevel)
    {
        this.confidenceLevel = confidenceLevel;
    }

    public double getPrice()
    {
        return price;
    }

    public void setPrice(double price)
    {
        this.price = price;
    }

    public int getQty()
    {
        return qty;
    }

    public void setQty(int qty)
    {
        this.qty = qty;
    }

    public String getUserDate1()
    {
        return userDate1;
    }

    public void setUserDate1(String userDate1)
    {
        this.userDate1 = ( userDate1 == null ? null : userDate1.trim() );
    }

    public String getUserList1()
    {
        return userList1;
    }

    public void setUserList1(String userList1)
    {
        this.userList1 = ( userList1 == null ? null : userList1.trim() );
    }

    public String getUserTxt1()
    {
        return userTxt1;
    }

    public void setUserTxt1(String userTxt1)
    {
        this.userTxt1 = ( userTxt1 == null ? null : userTxt1.trim() );
    }

    public String getUserTxt2()
    {
        return userTxt2;
    }

    public void setUserTxt2(String userTxt2)
    {
        this.userTxt2 = ( userTxt2 == null ? null : userTxt2.trim() );
    }
    public String getPriceAsString()
    {
        return StringUtils.formatAmount( price, "$###,###.##" );
    }
}
